import request from "@/utils/request";

export function getCompanyBrokerInfoById() {
  return request({
    url: `/recruit2/api/v1/companyUnits/getCompanyBrokerInfoById`,
    method: "GET"
  });
}

export function getBrokerPageById(params) {
  return request({
    url: `/recruit2/api/v1/companyUnits/getBrokerPageById`,
    method: "GET",
    params
  });
}

export function getFindBrokerJobSeekerById(params) {
  return request({
    url: `/recruit2/api/v1/brokers/findBrokerJobSeekerById`,
    method: "GET",
    params
  });
}

export function postSaveWithPC(data) {
  return request({
    url: "/recruit2/api/v1/brokers/saveWithPC",
    method: "post",
    data
  });
}

export function putBrokers(data) {
  return request({
    url: "/recruit2/api/v1/brokers",
    method: "put",
    data
  });
}

// export function delCompanyUnits(companyUnitsId) {
//   return request({
//     url: `/recruit2/api/v1/companyUnits/${companyUnitsId}`,
//     method: "delete"
//   });
// }
export function delBrokerId(brokerId) {
  return request({
    url: `/recruit2/api/v1/brokers/${brokerId}`,
    method: "delete"
  });
}

export function getChannels(params) {
  return request({
    // url: "hr/api/v1/channels/listAll",
    url: "/hr/api/v1/channels/listAllNoSynchronizationBroker",
    method: "GET",
    params
  });
}

export function postSynchronizationBroker(data) {
  return request({
    url: "/hr/api/v1/channels/synchronizationBroker",
    method: "post",
    data
  });
}

export function getUsers(params) {
  return request({
    url: "/hr/api/v1/users/selectHadRoleUserIdBySiteId",
    method: "GET",
    params
  });
}
